#include "qmywidget.h"

#include "../../libs/sharedlib/qwidgethost.h"

#include <QVariant>
#include <QStyleOption>
#include <QPainter>

QMyWidget::QMyWidget(QWidget *parent) :
    QWidget(parent),
    m_host(new SHAREDLIB::QWidgetHost(this))
{
    m_host->setProperty("needFrame",true);
    this->setProperty("objectName","widget");
    this->setProperty("className","Widget");
    this->setAutoFillBackground(true);
    this->resize(100,50);
}

void QMyWidget::paintEvent(QPaintEvent *)
 {
     QStyleOption opt;
     opt.init(this);
     QPainter p(this);
     style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
 }
